package com.orange.homescreen.pil;

import java.util.List;
import java.util.Map;

import android.content.Context;
import android.database.Cursor;
import android.graphics.Bitmap;

import com.orange.homescreen.pil.base.BasePILMonitor;
import com.orange.notificationsummary.event.MessageInfo;
import com.orange.notificationsummary.event.pil.defaultimpl.BaseEvent;

public interface NotificationSummaryInterface {
	// monitor
	public BasePILMonitor getContactsMonitor(Context context);

	public BasePILMonitor getMissedCallMonitor(Context context);

	public BasePILMonitor getUnreadMsgMonitor(Context context);

	public BasePILMonitor getTimeMonitor(Context context);

	public BasePILMonitor getDateMonitor(Context context);

	// missedCall
	int getMissedCallCount(Context context);

	String[] getIdsByNumber(String phoneNumber, Context context);

	List<BaseEvent> getAllMissedCallEvent(Context context);

	List<BaseEvent> getMissedCallList(Context context);

	/**
	 * query misscall info and sort it by date.
	 * 
	 * @param context
	 * @return
	 */
	Cursor getMissedCallCursor(Context context);

	String[] getMissCallIDsByNumber(String phoneNumber, Context context);

	boolean updateMissCallStatusByIds(Context context, String[] _ids);

	int updateMissCallStatusByNumber(Context context, String columnName,
			String columnValue);

	// message
	int getUnreadMessageCount(Context context);

	List<BaseEvent> getUnreadMessageList(Context context);

	List<MessageInfo> getUnreadMmsInfo(Context context);

	List<MessageInfo> getUnreadSmsInfo(Context context);

	List<MessageInfo> getUnreadMmsSmsInfo(Context context);

	Map<String, Integer> getAttachmentCountInMMSDetailed(Context context,
			String mId);

	boolean updateSMSStatusById(Context context, String id);

	/**
	 * query column "ct_l" from table pdu by id. "ct_l" is a web address.
	 * 
	 * @param context
	 * @param id
	 *            the mms id ( _id)
	 * @return web address
	 */
	String getMMSContentLocationUrl(Context context, String id);

	List<BaseEvent> getAllUnreadMessageEvent(Context context);

	String getMmsTextContent(Context context, String mId);

	Bitmap getMmsPhotobyMmsId(Context context, String id);

	String getSmsNumber(Context context, String id);

	// voiceMail
	int getVoiceMailCount(Context context);

	List<BaseEvent> getVoiceMailList(Context context);

	Cursor getVoiceMailCursor(Context context);

	int getVoiceMailInfoCount(Context context);

	boolean updateVVMStatusByIds(Context context, String[] ids);

	boolean insertCallLog(Context context, BaseEvent missedCallInfo);

	String getDisplayNameByNumber(Context context, String number);

	Cursor getThreadsInfoCursor(Context context);

	boolean updateCallLogStatusByIds(Context context, String[] _ids);

	boolean updateUnreadMsgStatusByThreadIds(Context context, String[] threadIds);
}
